import hljs from 'highlight.js';

export default (app:any)=> {
  app.directive("hljs", {
    mounted(el:any, bindings:any, vnode:any, preVnode:any) {
      // console.log(el)
      let blocks = el.querySelectorAll('pre code');
      Array.prototype.forEach.call(blocks, hljs.highlightBlock);
    }
  })
}


